<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:af="http://myfaces.apache.org/trinidad"
	xmlns:afh="http://myfaces.apache.org/trinidad/html"
	>

<ui:remove>
	<af:panelGroup layout="horizontal">

	<af:panelGroup layout="vertical">
		<af:menuButtons>
			<af:commandMenuItem icon="/images/icons/plain/upGrey.gif"
				shortDesc="#{commonMsg.sortedAscending}"
				actionListener="#{sortModel.setSortColumn}">
				<af:setActionListener from="#{sortProperty}" to="#{processScope.sortProperty}" />
				<af:setActionListener from="ascending" to="#{processScope.sortOrder}" />
			</af:commandMenuItem>
		</af:menuButtons>
		<af:menuButtons>
			<af:commandMenuItem icon="/images/icons/plain/downGrey.gif"
				shortDesc="#{commonMsg.sortedDescending}"
				actionListener="#{sortModel.setSortColumn}">
				<af:setActionListener from="#{sortProperty}" to="#{processScope.sortProperty}" />
				<af:setActionListener from="descending" to="#{processScope.sortOrder}" />
			</af:commandMenuItem>
		</af:menuButtons>
	</af:panelGroup>
	
	</af:panelGroup>
</ui:remove>

	<af:switcher facetName="#{sortModel.sortStatus[sortProperty]}" defaultFacet="unsorted">
		<f:facet name="ascending">
			<af:panelButtonBar>
				<af:commandButton icon="/images/icons/arrow_up.gif"
					shortDesc="#{commonMsg.sortedAscending}"
					actionListener="#{sortModel.setSortColumn}">
					<af:setActionListener from="#{sortProperty}" to="#{processScope.sortProperty}" />
					<af:setActionListener from="descending" to="#{processScope.sortOrder}" />
				</af:commandButton>
			</af:panelButtonBar>
		</f:facet>
		<f:facet name="descending">
			<af:panelButtonBar>
				<af:commandButton icon="/images/icons/arrow_down.gif"
					shortDesc="#{commonMsg.sortedDescending}"
					actionListener="#{sortModel.setSortColumn}">
					<af:setActionListener from="#{sortProperty}" to="#{processScope.sortProperty}" />
					<af:setActionListener from="ascending" to="#{processScope.sortOrder}" />
				</af:commandButton>
			</af:panelButtonBar>
		</f:facet>
		<f:facet name="unsorted">
			<af:panelButtonBar>
				<af:commandButton icon="/images/icons/arrow_both-greyed.gif"
					shortDesc="#{commonMsg.sortedNot}"
					actionListener="#{sortModel.setSortColumn}">
					<af:setActionListener from="#{sortProperty}" to="#{processScope.sortProperty}" />
					<af:setActionListener from="ascending" to="#{processScope.sortOrder}" />
				</af:commandButton>
			</af:panelButtonBar>
		</f:facet>
	</af:switcher>

</ui:composition>
